package com.winning.ywypt.config;

import com.winning.ywypt.controller.Datacontroller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * 定时任务的配置类
 */
@Configuration
//@EnableScheduling
public class TimingTaskConfig {
    @Autowired
    Datacontroller datacontroller;

    @Scheduled(cron = "${com.winning.ywypt.jgks.schedued}")
    public void scheduled() {
        datacontroller.UploadData();
    }
}
